package cn.edu.cqie.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public enum LoginSrcEnum {

	WECHAT(1, "微信"),

	PC(2, "控台");

	private int code; // 本地数据库值
	private String message; // 内容

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	private LoginSrcEnum(int code, String message) {
		this.code = code;
		this.message = message;
	}

	public static List<Map<String, Object>> getAll() {
		List<Map<String, Object>> lst = new ArrayList<Map<String, Object>>();
		for (LoginSrcEnum c : LoginSrcEnum.values()) {
			Map<String, Object> item = new HashMap<String, Object>();
			item.put("name", c.getMessage());

			lst.add(item);
		}
		return lst;
	}
}
